package com.gupao.javavip.dubbo.provider;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import lombok.extern.apachecommons.CommonsLog;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

@CommonsLog
@Component
public class NacosConfigTest implements ApplicationListener<ContextRefreshedEvent> {

    @NacosValue(value = "${biz.test-config:notfound}", autoRefreshed = true)
    private String testConfig;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        log.info(testConfig);
    }
}
